#import "CTHeaderSubTitleView.h"
@implementation CTHeaderSubTitleView
-(instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if(self){
        self.contentView.backgroundColor = [UIColor whiteColor];
        [self createUI];
    }
    return self;
}
-(void)createUI {
    [self.contentView addSubview:self.titleLabel];
    [self.contentView addSubview:self.subTitleLabel];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(Ratio(12));
        make.left.mas_equalTo(Ratio(16));
    }];
    [self.subTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(Ratio(4));
        make.left.mas_equalTo(Ratio(16));
    }];
}
- (UILabel *)titleLabel {
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.numberOfLines = 1;
        _titleLabel.font = [UIFont systemFontOfSize:Ratio(17) weight:UIFontWeightMedium];
        _titleLabel.textColor = [UIColor color30323E];
        _titleLabel.text = @"";
    }
    return _titleLabel;
}
- (UILabel *)subTitleLabel {
    if (!_subTitleLabel) {
        _subTitleLabel = [[UILabel alloc] init];
        _subTitleLabel.numberOfLines = 1;
        _subTitleLabel.font = [UIFont systemFontOfSize:Ratio(15) weight:UIFontWeightMedium];
        _subTitleLabel.textColor = [UIColor colorWithHexString:@"#727688"];
        _subTitleLabel.text = @"";
    }
    return _subTitleLabel;
}
@end
